package com.ys.day30.p1回顾升级;

import java.util.Objects;

/**
 * 描述:
 *
 * @author CodeYang
 * @version 2021/1/12 1:25
 */
public class Student {


    private int id = 10001;

    private String name = "jim";

    private  String love ="打球";

    public Student() {
    }

    public Student(int id, String name, String love) {
        this.id = id;
        this.name = name;
        this.love = love;
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return id == student.id &&
                Objects.equals(name, student.name) &&
                Objects.equals(love, student.love);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, love);
    }

    public int getId() {

        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLove() {
        return love;
    }

    public void setLove(String love) {
        this.love = love;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", love='" + love + '\'' +
                '}';
    }
}
